//
//  WebInfoViewController.m
//  Bees
//
//  Created by NowYouCanSee on 2019/2/26.
//  Copyright © 2019 xiaohan. All rights reserved.
//

#import "WebInfoViewController.h"
#import "ShareView.h"
#import "AppDelegate+UMengHelper.h"
@interface WebInfoViewController ()

@end

@implementation WebInfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
}

- (void)setupUI{
    if (self.isShare) {
        [self addNavigationItemWithImageNames:@[@"share"] isLeft:NO target:self action:@selector(rightClick) tags:nil];
    }
}
- (void)rightClick{
    [self share];
}
- (void)share{
    [ShareView showCallback:^(ShareType type) {
        UMSocialPlatformType umSocialPlatformType = type+1;
        NSString *title = self.title?:@"";
        NSString *url = self.gotoURL;
        [kAppDelegate shareWebPageToPlatformType:umSocialPlatformType shareTitle:title subTitle:title thumbImage:@"" shareURL:url completion:^(BOOL success) {
        }];
    }];
}

@end
